package com.klikmee.sms.core.base.handlers;

import com.klikmee.sms.core.base.Core;
import com.klikmee.sms.core.base.creators.MessageCreator;
import com.klikmee.sms.core.base.dao.BulkMessageDAO;
import com.klikmee.sms.core.base.dao.IncomingMessageDAO;
import com.klikmee.sms.core.base.dao.OutgoingMessageDAO;
import com.klikmee.sms.core.base.dao.PaymentInvoiceDAO;
import com.klikmee.sms.core.base.postman.ServiceMessageDeliverer;
import com.klikmee.sms.core.commons.exceptions.ExceptionHandler;

public abstract class AbstractDeliveryHandler<T> implements DeliveryReportHandler<T> {

	protected OutgoingMessageDAO		outgoingMessageDAO;
	protected BulkMessageDAO			bulkMessageDAO;
	protected PaymentInvoiceDAO			paymentInvoiceDAO;
	protected IncomingMessageDAO		incomingMessageDAO;
	protected Core						core;
	protected MessageCreator			messageCreator;
	protected ServiceMessageDeliverer	serviceMessageDeliverer;
	protected ExceptionHandler			exceptionHandler;

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * com.klikmee.sms.core.base.handlers.DeliveryReportHandler#handle(com.klikmee
	 * .sms.core.model.OutgoingMessage)
	 */
	@Override
	public abstract void handle(T message);

	public OutgoingMessageDAO getOutgoingMessageDAO() {
		return outgoingMessageDAO;
	}

	public void setOutgoingMessageDAO(OutgoingMessageDAO outgoingMessageDAO) {
		this.outgoingMessageDAO = outgoingMessageDAO;
	}

	public PaymentInvoiceDAO getPaymentInvoiceDAO() {
		return paymentInvoiceDAO;
	}

	public void setPaymentInvoiceDAO(PaymentInvoiceDAO paymentInvoiceDAO) {
		this.paymentInvoiceDAO = paymentInvoiceDAO;
	}

	public IncomingMessageDAO getIncomingMessageDAO() {
		return incomingMessageDAO;
	}

	public void setIncomingMessageDAO(IncomingMessageDAO incomingMessageDAO) {
		this.incomingMessageDAO = incomingMessageDAO;
	}

	public void setServiceMessageDeliverer(ServiceMessageDeliverer serviceMessageDeliverer) {
		this.serviceMessageDeliverer = serviceMessageDeliverer;
	}

	public void setCore(Core core) {
		this.core = core;
	}

	public void setMessageCreator(MessageCreator messageCreator) {
		this.messageCreator = messageCreator;
	}

	public void setExceptionHandler(ExceptionHandler exceptionHandler) {
		this.exceptionHandler = exceptionHandler;
	}

	public BulkMessageDAO getBulkMessageDAO() {
		return bulkMessageDAO;
	}

	public void setBulkMessageDAO(BulkMessageDAO bulkMessageDAO) {
		this.bulkMessageDAO = bulkMessageDAO;
	}
}
